﻿using AppService.IService.System_operation;
using AppService.Service.System_operation;
using Domain.Entity.System_operation;
using Domain.Entity.System_Ordermanagement;
using Microsoft.AspNetCore.Mvc;

namespace WebAPI.Controllers.System_operation
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class Signature_receiptController : ControllerBase
    {
        private readonly ISignature_receiptService Isignature_receiptService;

        public Signature_receiptController(ISignature_receiptService isignature_receiptService)
        {
            Isignature_receiptService = isignature_receiptService;
        }

        [HttpGet]
        public int Count(string? Sign_time, string? value2, string? Ord_startaddress, string? Ord_destination)
        {
            return Isignature_receiptService.Count(Sign_time,value2,Ord_startaddress,Ord_destination);
        }

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="currentPage"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        [HttpGet("{currentPage},{PageSize}")]
        public List<Signature_receipt> GetSignature_receipt(int currentPage, int PageSize)
        {
            return Isignature_receiptService.GetSignature_receipt(currentPage, PageSize);
        }
        [HttpGet("{id}")]
        public Orders GetOrd_id(int id)
        {
            return Isignature_receiptService.GetOrd_id(id);
        }

        [HttpGet("{currentPage},{PageSize}")]
        public List<Signature_receipt> Sign_condition(string? Sign_time, string? value2, string? Ord_startaddress, string? Ord_destination, int currentPage, int PageSize)
        {
            return Isignature_receiptService.Sign_condition(Sign_time,value2,Ord_startaddress,Ord_destination, currentPage, PageSize);
        }

        /// <summary>
        /// </summary>
        /// <param name="Ord_id"></param>
        /// <returns></returns>
        [HttpGet("{Ord_id}")]
        public List<Signature_receipt> GetSign_XQ(int Ord_id)
        {
            return Isignature_receiptService.GetSign_XQ(Ord_id);
        }
    }
}
